/**
 * @see [微信官方文档](https://mp.weixin.qq.com/debug/wxadoc/dev/api/device.html#wxsetscreenbrightnessobject)
 * @param value [number]屏幕亮度值，范围 0~1，0 最暗，1 最亮
 */
export default function set_screen_brightness(value: number) {
	return new Promise<boolean>((resolve, reject) => {
		wx.setScreenBrightness({
			value,
			fail() {
				reject(false);
			},
			success() {
				resolve(true);
			}
		});
	});
}
